package com.liuzhilong.infrastructure.basic.decorator;

public class OriginalClassWrapper implements OriginalInterface {
    private OriginalInterface originalInterface;

    public OriginalClassWrapper(OriginalInterface originalInterface) {
        this.originalInterface = originalInterface;
    }

    @Override
    public void method1() {
        System.out.println(getClass().getName()+" method1 额外行为");
        originalInterface.method1();
    }

    @Override
    public String method2(String params) {

        return originalInterface.method2(params)+" "+getClass().getName()+" method2 额外行为";

    }
}
